package com.ruoyi.house.service.impl;

import java.util.List;

import com.ruoyi.house.domain.vo.TbApartmentVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.house.mapper.TbApartmentMapper;
import com.ruoyi.house.domain.TbApartment;
import com.ruoyi.house.service.ITbApartmentService;

/**
 * 公寓管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-10-08
 */
@Service
public class TbApartmentServiceImpl implements ITbApartmentService 
{
    @Autowired
    private TbApartmentMapper tbApartmentMapper;

    /**
     * 查询公寓管理
     * 
     * @param apartmentId 公寓管理主键
     * @return 公寓管理
     */
    @Override
    public TbApartment selectTbApartmentByApartmentId(Long apartmentId)
    {
        return tbApartmentMapper.selectTbApartmentByApartmentId(apartmentId);
    }

    /**
     * 查询公寓管理列表
     * 
     * @param tbApartment 公寓管理
     * @return 公寓管理
     */
    @Override
    public List<TbApartment> selectTbApartmentList(TbApartment tbApartment)
    {
        return tbApartmentMapper.selectTbApartmentList(tbApartment);
    }

    @Override
    public List<TbApartmentVo> selectTbApartmentVoList(TbApartment tbApartment) {
        return tbApartmentMapper.selectTbApartmentVoList(tbApartment);
    }

    /**
     * 新增公寓管理
     * 
     * @param tbApartment 公寓管理
     * @return 结果
     */
    @Override
    public int insertTbApartment(TbApartment tbApartment)
    {
        return tbApartmentMapper.insertTbApartment(tbApartment);
    }

    /**
     * 修改公寓管理
     * 
     * @param tbApartment 公寓管理
     * @return 结果
     */
    @Override
    public int updateTbApartment(TbApartment tbApartment)
    {
        return tbApartmentMapper.updateTbApartment(tbApartment);
    }

    /**
     * 批量删除公寓管理
     * 
     * @param apartmentIds 需要删除的公寓管理主键
     * @return 结果
     */
    @Override
    public int deleteTbApartmentByApartmentIds(Long[] apartmentIds)
    {
        return tbApartmentMapper.deleteTbApartmentByApartmentIds(apartmentIds);
    }

    /**
     * 删除公寓管理信息
     * 
     * @param apartmentId 公寓管理主键
     * @return 结果
     */
    @Override
    public int deleteTbApartmentByApartmentId(Long apartmentId)
    {
        return tbApartmentMapper.deleteTbApartmentByApartmentId(apartmentId);
    }
}
